abstract class LoggerImpl implements Logger{
	public void debug(String p_msg){
		logMessage("DEBUG",p_msg);
	}
	
	public void info(String p_msg){
		logMessage("INFO",p_msg);
	}
	
	public void warn(String p_msg){
		logMessage("WARNING",p_msg);
	}
	
	public void error(String p_msg){
		logMessage("ERROR",p_msg);
	}
	
	protected void logMessage(String p_level, String p_msg){
		String msg = timestamp() + " " + p_level.toUpperCase() + " -- " + p_msg;
		
		outputLogMessage(msg);
	}
	
	protected abstract void outputLogMessage(String p_msg);
	
	protected String timestamp(){
		//return new Long(System.currentTimeMillis()).toString();
		//or a somewhat better formatted output
		return new java.text.SimpleDateFormat("yyyy-MM-dd_HH:mm:ss").format(new java.util.Date()); 
	}
}